package com.beidu.lottery.call.entity.common;

import com.beidu.lottery.call.common.BaseContextHandler;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Transient;

import javax.validation.constraints.NotNull;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageQuery {

    @ApiModelProperty(value = "当前页码")
    @Transient
    @NotNull(message = "当前页码不能为空")
    protected Integer pageNum = 1;

    @ApiModelProperty(value = "每页数量")
    @Transient
    @NotNull(message = "每页数量不能为空")
    protected Integer pageSize = 10;

    @ApiModelProperty(value = "租户code")
    @Transient
    protected String tenantCode = BaseContextHandler.getTenant();

}
